import axios from '@/utils/request'

// 获取验证码
const getCode = (sid) => {
  return axios.get('/public/getCaptcha', {
    params: {
      sid: sid
    }
  })
}

// 获取邮箱验证码
const forget = (option) => {
  return axios.post('/login/forget', { ...option })
}

// 登录接口
const login = (loginInfo) => {
  return axios.post('/login/login', {
    ...loginInfo
  })
}

// 注册接口
const regist = (regInfo) => {
  return axios.post('/login/regist', {
    ...regInfo
  })
}

// 修改密码接口
const reset = (resetInfo) => {
  return axios.post('/login/reset', { ...resetInfo })
}

export {
  getCode, forget, login, regist, reset
}
